package edu.zut.hb.software.waypath.impl;

import java.util.ArrayList;
import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericTreeManagerImpl;
import edu.zut.hb.software.waypath.LineNetworkService;
import edu.zut.hb.software.waypath.dao.LineNetworkDao;
import edu.zut.hb.software.waypath.domain.LineNetwork;

@Service
@Transactional
public class LineNetworkServiceImpl extends GenericTreeManagerImpl<LineNetwork, Long>
        implements LineNetworkService {


    LineNetworkDao lineNetworkDao;

    @Autowired
    public void LineNetworkDao(LineNetworkDao LineNetworkDao) {
        this.lineNetworkDao = lineNetworkDao;
        this.treeDao=lineNetworkDao;
        this.dao=treeDao;
    }

    @Override
        public List list() {
            List list = new ArrayList();
            for (int i = 0; i < 100; i++) {
                LineNetwork lineNetwork = new LineNetwork();
                lineNetwork.setName("路线名称"+i);
                lineNetwork.setAddress("路线地址"+i);
                lineNetwork.setPhone("电话号码"+i);
                list.add(lineNetwork);
            }
            return list;

        }



}
